package com.bw.cement.viewmodel

import androidx.lifecycle.MutableLiveData
import com.bw.cement.entity.CementEntity
import com.bw.cement.net.ApiService
import com.bw.common.vm.BaseViewModel
import com.bw.http.utils.zgr.OkHttpClientManager

class CementViewModel:BaseViewModel() {

    val apiService:ApiService = OkHttpClientManager.retrofitInstance.create(ApiService::class.java)

    val cementSuccess by lazy { MutableLiveData<List<CementEntity>>() }


    fun getCementsByUid(uid: Int) {
        executeNetwork(
            { apiService.getCementsByUid(uid) },
            cementSuccess::postValue
        )
    }

}